package com.qf.exception.handler;


import com.qf.exception.UserException;
import com.qf.vo.ResultVo;
import com.qf.vo.ResultVoUtils;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@RestControllerAdvice
public class UserExceptionHandler {

    @ExceptionHandler(UserException.class)
    public ResultVo error(UserException ex){
        ResultVo err = ResultVoUtils.err(ex);
        return err;
    }
}
